#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
//#include <QMultimedia>
#include <QtMultimedia>
#include <QFile>
#include <QDebug>
#include <QAudioFormat>
#include <QAudioDeviceInfo>
#include <QAudioInput>
#include <QTimer>
#include <QAudioOutput>
#include <QDir>

#define USE_SAMPLE_16000	1 //zewen add for mic sample 8K/16K switch 

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
        Q_OBJECT

public:
        explicit MainWindow(QWidget *parent = 0);
        ~MainWindow();

private slots:
        void on_pushButton_play_clicked();

        void on_pushButton_record_clicked();

        void on_pushButton_clicked();

private:
        Ui::MainWindow *ui;
        QFile *file;
        QAudioInput * input;
        QAudioOutput* output;
        int count; // count the click of record button
        int countPlay; // count the click of play button

        QString current_path;

        QAudioDeviceInfo m_currentDeviceInput;
        QAudioDeviceInfo m_currentDeviceOutput;
};

#endif // MAINWINDOW_H
